interface IHeaders {
	actionid: string;
	messagetype: string;
	sessionid: string;
	spaceid: string;
}

declare function send_msg(msg_type: string, msg: any): Promise<any>;
declare const spaceid: string;

interface BaseTable {
	_id: string;
}

interface BaseArgJson {
	opflag: 2 | 4 | 8;	// delete | insert | update
	tname: string;
}

interface ArgJsonInsert extends BaseArgJson {
	opflag: 4;	// insert
	rowdata: BaseTable;
}

interface ArgJsonUpdate extends BaseArgJson {
	opflag: 8;	// update
	criteria: object;
	rowdata: BaseTable;
}

interface ArgJsonDelete extends BaseArgJson {
	opflag: 2;	// delete
	criteria: object;
}
